package com.fxp.project.jiuselu.web.models.order.mapper;

import com.fxp.project.jiuselu.web.models.order.entity.JslCart;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.fxp.project.jiuselu.web.models.order.vo.JslCartVo;
import org.apache.ibatis.annotations.Param;
import org.springframework.security.access.prepost.PreAuthorize;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 购物车 Mapper 接口
 * </p>
 *
 * @author Jason.Wang
 * @since 2021-11-11
 */
public interface JslCartMapper extends BaseMapper<JslCart> {

    /**
     * selectJslCartVoByUserId: 通过用户获取购物车信息<br/>
     *
     * @param userId
     * @return
     * @author Kai.Wang
     * @date 2021/11/11 13:38
     */
    List<JslCartVo> selectJslCartVoByUserId(Long userId);


    List<Map<Object,String>> selectSampleCartList(Long userId);

    JslCart selectJslCartVoByUserIdAndGoodsId(@Param("userId") Long userId,@Param("goodsId") Long goodsId);

}
